hysop.backend.host.python.operator.convergence module

@file convergence.py Convergence python backend.

class hysop.backend.host.python.operator.convergence.PythonConvergence(**kwds)[source]

Bases: ConvergenceBase, HostOperator

Computes convergence of a field through iterations

variables: dict

dictionary of fields as keys and topologies as values.

convergence: TensorParameter (optional)

Parameter to store the components of ||u-u_old||_infty or ||u-u_old||_infty/||u||_infty

implementation: Implementation, optional, defaults to None

target implementation, should be contained in available_implementations(). If None, implementation will be set to default_implementation().

kwds:

Extra keywords arguments that will be passed towards implementation enstrophy operator __init__.

apply(**kwds)

Abstract method that should be implemented. Applies this node (operator, computational graph operator…).

setup(**kwds)[source]

Setup temporary buffer that have been requested in get_work_properties(). This function may be used to execute post allocation routines. This sets self.ready flag to True. Once this flag is set one may call ComputationalGraphNode.apply() and ComputationalGraphNode.finalize().

Automatically honour temporary field memory requests.

classmethod supports_mpi()[source]

Return True if this operator was implemented to support multiple mpi processes.